 

using System;

namespace Petaframe.Logging
{
	
	public abstract class LogEntryFormatter
	{
       
        protected Logger.LoggingErrorHandler LoggingErrorHandler { get; set; }

		
		private String _formatString = "";
		
		public String FormatString
		{
			get { return _formatString; }
			set { _formatString = value; }
		}

		
		protected internal abstract String AsString(LogEntry aLogEntry);

		
		protected String DateString(LogEntry aLogEntry) 
		{
			return  aLogEntry.Date.ToString(FormatString);
		}
		
		protected LogEntryFormatter(Logger.LoggingErrorHandler aLoggingErrorHandler) : base()
		{
            LoggingErrorHandler = aLoggingErrorHandler;
		}
	}
}
